<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Hard
  </div>
  <div>
   <h1 class="question_title">
    214. Shortest Palindrome
   </h1>
   <p>
    Given a string
    <em>
     <b>
      s
     </b>
    </em>
    , you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you can find by performing this transformation.
   </p>
   <p>
    <strong>
     Example 1:
    </strong>
   </p>
   <pre>
<strong>Input: </strong><code>"aacecaaa"</code>
<strong>Output:</strong> <code>"aaacecaaa"</code>
</pre>
   <p>
    <strong>
     Example 2:
    </strong>
   </p>
   <pre>
<strong>Input: </strong><code>"abcd"</code>
<strong>Output:</strong> <code>"dcbabcd"</code></pre>
  </div>
  <div>
   <h1 class="question_title">
    214. 最短回文串
   </h1>
   <p>
    给定一个字符串
    <em>
     <strong>
      s
     </strong>
    </em>
    ，你可以通过在字符串前面添加字符将其转换为回文串。找到并返回可以用这种方式转换的最短回文串。
   </p>
   <p>
    <strong>
     示例&nbsp;1:
    </strong>
   </p>
   <pre><strong>输入: </strong><code>"aacecaaa"</code>
<strong>输出:</strong> <code>"aaacecaaa"</code>
</pre>
   <p>
    <strong>
     示例 2:
    </strong>
   </p>
   <pre><strong>输入: </strong><code>"abcd"</code>
<strong>输出:</strong> <code>"dcbabcd"</code></pre>
  </div>
 </body>
</html>